package com.improvess.rna.som.knn;
import Jama.Matrix;

public class Euclidean {

	public static double getDistance(Matrix p1, Matrix p2){
		double distance = 0.0;
		for(int k = 0; k<p1.getRowDimension();k++){
			double att1 = p1.get(k,0);
			double att2 = p2.get(k,0);
			distance = distance+Math.pow(att1-att2, 2);
		}
		distance = Math.pow(distance, 0.5);
		return distance;
	}
}